/*
 *  Copright: 2008 Philipp Leitner, Distributed Systems Group,
 *            TU Wien, leitner@infosys.tuwien.ac.at
 *
 *  This file is part of DAIOS.
 *
 *  DAIOS is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as
 *  published by the Free Software Foundation.
 * 
 *  DAIOS is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with DAIOS.  If not, see
 *  <http://www.gnu.org/licenses/>.
 * 
 */

package at.ac.tuwien.infosys.dsg.daios.wsdl.interfaces;

import java.util.List;

import javax.xml.namespace.QName;

import at.ac.tuwien.infosys.dsg.daios.framework.DaiosInterceptor;
import at.ac.tuwien.infosys.dsg.daios.wsdl.WSDLEncoding;
import at.ac.tuwien.infosys.dsg.daios.wsdl.typesystem.WSDLTypeTree;

/**
 * Interface defining a Daios WSDL definition structure.
 * 
 * @author philipp
 *
 */
public interface IWSDL {
	
	/**
	 * Get all services that are defined in this WSDL file.
	 * 
	 * @return A list of all services.
	 */
	public List<IWSDLService> getServices();
	
	/**
	 * Get all messages that are defined in this WSDL file.
	 * 
	 * @return A list of all messages.
	 */
	public List<IWSDLMessage> getMessages();
	
	/**
	 * Get all operations that are defined in this WSDL file.
	 * 
	 * @return A list of all operations.
	 */
	public List<IWSDLOperation> getOperations();
	
	/**
	 * Get all types that are defined in this WSDL file.
	 * 
	 * @return A list of all types.
	 */
	public WSDLTypeTree getTypes();
	
	/**
	 * Get a specific operation from this definition.
	 * 
	 * @param operation The QName of the operation to get.
	 * @return The operation. Null if such an operation does not
	 * exist in this definition.
	 */
	public IWSDLOperation getOperation(QName operation);

	/**
	 * Get a specific message from this definition.
	 * 
	 * @param message The QName of the message to get.
	 * @return The message. Null if such a message does not
	 * exist in this definition.
	 */	
	public IWSDLMessage getMessage(QName message);
	
	/**
	 * Get the SOAP binding style of this WSDL definition.
	 * 
	 * @return The binding style (rpc, document/literal
	 * or document/wrapped).
	 */
	public WSDLEncoding getBindingStyle();
	
	/**
	 * Hook an interceptor into the WSDL file.
	 * 
	 * @param interceptor
	 */
	public void setInterceptor(DaiosInterceptor interceptor);

}